<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="org.jeecgframework.web.util.StaticValue" %>
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/context/mytags.jsp" %>
<html>
<head>
    <title>引擎翻新现场检测完工单</title>
    <script type="text/javascript" src="plug-in/mutiLang/zh-cn.js"></script>
    <script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.js"></script>
    <link rel="stylesheet" href="plug-in/uploadify/css/uploadify.css" type="text/css"/>
    <script type="text/javascript" src="plug-in/uploadify/jquery.uploadify-3.1.min.js"></script>
    <script type="text/javascript" src="plug-in/tools/dataformat.js"></script>
    <link id="easyuiTheme" rel="stylesheet" href="plug-in/easyui/themes/default/easyui.css" type="text/css"></link>
    <link rel="stylesheet" href="plug-in/easyui/themes/icon.css" type="text/css"></link>
    <link rel="stylesheet" type="text/css" href="plug-in/accordion/css/accordion.css">
    <script type="text/javascript" src="plug-in/easyui/jquery.easyui.min.1.3.2.js"></script>
    <script type="text/javascript" src="plug-in/easyui/locale/zh-cn.js"></script>
    <script type="text/javascript" src="plug-in/tools/syUtil.js"></script>
    <script type="text/javascript" src="plug-in/easyui/extends/datagrid-scrollview.js"></script>
    <script type="text/javascript" src="plug-in/My97DatePicker/WdatePicker.js"></script>
    <link rel="stylesheet" href="plug-in/tools/css/common.css" type="text/css"></link>
    <script type="text/javascript" src="plug-in/lhgDialog/lhgdialog.min.js"></script>
    <script type="text/javascript" src="plug-in/tools/curdtools_zh-cn.js"></script>
    <script type="text/javascript" src="plug-in/tools/easyuiextend.js"></script>
    <script type="text/javascript" src="plug-in/jquery-plugs/hftable/jquery-hftable.js"></script>
    <link rel="stylesheet" href="plug-in/jquery/jquery-autocomplete/jquery.autocomplete.css" type="text/css"></link>
    <script type="text/javascript" src="plug-in/jquery/jquery-autocomplete/jquery.autocomplete.min.js"></script>
</head>
<script>
    $(function () {
        $('#equipmentType').combotree({
            url: 'cbsTechologyAgreeReportController.do?getEqTypes',
            required: true
        });
    })

    function getCity() {
        var province = $("#sheng").val();
        $.ajax({
            type: "post",
            dataType: "json",
            data: {"province": province},
            url: "cbsServiceReportController.do?getCityByCode",
            success: function (data) {
                var obj = data.obj;
                var html = " <option value='0'>--请选择--</option>";
                for (i in obj) {
                    html += "<option value='" + obj[i].territoryCode + "'>" + obj[i].territoryName + "</option>";
                }
                $("#shi").html(html);
            }
        })
    }

    $(function () {
        var cbsServiceId = $("#cbsServiceId").val();
        $("#fileUpload1").uploadify({
            buttonText: '上传文件',
            auto: true,
            progressData: 'speed',
            multi: true,
            height: 20,
            width: 60,
            overrideEvents: ['onDialogClose'],
            queueID: 'instructionfile',
            fileTypeDesc: '文件格式:',
            fileTypeExts: '*.*',
            /*fileTypeDesc : '支持格式:*.pdf',
            fileTypeExts : '*.pdf',*/ //控制可上传文件的扩展名，启用本项时需同时声明fileDesc
            fileSizeLimit: '15MB',
            swf: 'plug-in/uploadify/uploadify.swf',
            uploader: 'cbsServiceController.do?fileUploadView&cbsServiceId=' + cbsServiceId + "&businessType=G1",
            onUploadStart: function () {
                lockmask(true, '请稍等,导入中...');
            },
            onUploadSuccess: function (file, data) {
                lockmask(false);
                var json = $.parseJSON(data).attributes;
                var name = json.name;
                var ins = name.lastIndexOf(".");
                var ins2 = name.length;
                var ho = name.substring(ins, ins2);
                var photoType = "完工单附件";
                var photoName = photoType + ho;
                console.log(json.id + "--" + json.name)
                var html = '<p id="' + json.id + '" style="background-color: white"><span name="finishFile" class="color-blue" id="' + json.id + '">' + photoName + '</span>&nbsp;&nbsp; ' +
                    '<span style="cursor: pointer; color: black" onclick=\'delFile("' + json.id + '")\'>[删除]</span></p>'
                $("#fileName1").prepend(html);
                $.ajax({
                    type: "post",
                    data: {"id": json.id, "name": photoName},
                    dataType: "json",
                    url: "cbsServiceReportController.do?changeName",
                    success: function (data) {
                        var b = data.success;
                    }
                })
                //tip("上传成功！");
                top.window.tip("上传成功！");
            }, onFallback: function () {
                tip("您未安装FLASH控件，无法上传文件！请安装FLASH控件后再试");
            }, onSelectError: function (file, errorCode, errorMsg) {
                switch (errorCode) {
                    case -100:
                        tip("上传的文件数量已经超出系统限制的" + $('#instruction').uploadify('settings', 'queueSizeLimit') + "个文件！");
                        break;
                    case -110:
                        tip("文件 [" + file.name + "] 大小超出系统限制的" + $('#instruction').uploadify('settings', 'fileSizeLimit') + "大小！");
                        break;
                    case -120:
                        tip("文件 [" + file.name + "] 大小异常！");
                        break;
                    case -130:
                        tip("文件 [" + file.name + "] 类型不正确！");
                        break;
                }
                ;
            }
        });
    });
    $(function () {
        var cbsServiceId = $("#cbsServiceId").val();
        $("#fileUpload2").uploadify({
            buttonText: '上传文件',
            auto: true,
            progressData: 'speed',
            multi: true,
            height: 20,
            width: 60,
            overrideEvents: ['onDialogClose'],
            queueID: 'instructionfile',
            fileTypeDesc: '文件格式:',
            fileTypeExts: '*.*',
            /*fileTypeDesc : '支持格式:*.pdf',
            fileTypeExts : '*.pdf',*/ //控制可上传文件的扩展名，启用本项时需同时声明fileDesc
            fileSizeLimit: '15MB',
            swf: 'plug-in/uploadify/uploadify.swf',
            uploader: 'cbsServiceController.do?fileUploadView&cbsServiceId=' + cbsServiceId + "&businessType=G2",
            onUploadStart: function () {
                lockmask(true, '请稍等,导入中...');
            },
            onUploadSuccess: function (file, data) {
                lockmask(false);
                var json = $.parseJSON(data).attributes;
                console.log(json.id + "--" + json.name)
                var html = '<p id="' + json.id + '" style="background-color: white"><span name="repairFile" class="color-blue" id="' + json.id + '">' + json.name + '</span>&nbsp;&nbsp; ' +
                    '<span style="cursor: pointer; color: black" onclick=\'delFile("' + json.id + '")\'>[删除]</span></p>'
                $("#fileName2").prepend(html);
                //tip("上传成功！");
                top.window.tip("上传成功！");
            }, onFallback: function () {
                tip("您未安装FLASH控件，无法上传文件！请安装FLASH控件后再试");
            }, onSelectError: function (file, errorCode, errorMsg) {
                switch (errorCode) {
                    case -100:
                        tip("上传的文件数量已经超出系统限制的" + $('#instruction').uploadify('settings', 'queueSizeLimit') + "个文件！");
                        break;
                    case -110:
                        tip("文件 [" + file.name + "] 大小超出系统限制的" + $('#instruction').uploadify('settings', 'fileSizeLimit') + "大小！");
                        break;
                    case -120:
                        tip("文件 [" + file.name + "] 大小异常！");
                        break;
                    case -130:
                        tip("文件 [" + file.name + "] 类型不正确！");
                        break;
                }
                ;
            }
        });
    });
    $(function () {
        var cbsServiceId = $("#cbsServiceId").val();
        $("#fileUpload3").uploadify({
            buttonText: '上传文件',
            auto: true,
            progressData: 'speed',
            multi: true,
            height: 20,
            width: 60,
            overrideEvents: ['onDialogClose'],
            queueID: 'instructionfile',
            fileTypeDesc: '文件格式:',
            fileTypeExts: '*.*',
            /*fileTypeDesc : '支持格式:*.pdf',
            fileTypeExts : '*.pdf',*/ //控制可上传文件的扩展名，启用本项时需同时声明fileDesc
            fileSizeLimit: '15MB',
            swf: 'plug-in/uploadify/uploadify.swf',
            uploader: 'cbsServiceController.do?fileUploadView&cbsServiceId=' + cbsServiceId + "&businessType=G3",
            onUploadStart: function () {
                lockmask(true, '请稍等,导入中...');
            },
            onUploadSuccess: function (file, data) {
                lockmask(false);
                var photoType = $("#photoType").val();
                var json = $.parseJSON(data).attributes;
                console.log(json.id + "--" + json.name)
                var fileDir = json.name;
                var suffix = fileDir.substr(fileDir.lastIndexOf("."));
                var html = '<div style="width: 200px;display: inline-block"><p id="' + json.id + '" style="background-color: white"><span name="photoFile" class="color-blue" id="' + json.id + '">' + photoType + suffix + '</span>&nbsp;&nbsp; ' +
                    '<span style="cursor: pointer; color: black" onclick=\'delFile("' + json.id + '")\'>[删除]</span></p></div>'
                $("#fileName3").prepend(html);
                photoType += suffix;
                $.ajax({
                    type: "post",
                    data: {"id": json.id, "name": photoType},
                    dataType: "json",
                    url: "cbsServiceReportController.do?changeName",
                    success: function (data) {
                        var b = data.success;
                    }
                })
                //tip("上传成功！");
                top.window.tip("上传成功！");
            }, onFallback: function () {
                tip("您未安装FLASH控件，无法上传文件！请安装FLASH控件后再试");
            }, onSelectError: function (file, errorCode, errorMsg) {
                switch (errorCode) {
                    case -100:
                        tip("上传的文件数量已经超出系统限制的" + $('#instruction').uploadify('settings', 'queueSizeLimit') + "个文件！");
                        break;
                    case -110:
                        tip("文件 [" + file.name + "] 大小超出系统限制的" + $('#instruction').uploadify('settings', 'fileSizeLimit') + "大小！");
                        break;
                    case -120:
                        tip("文件 [" + file.name + "] 大小异常！");
                        break;
                    case -130:
                        tip("文件 [" + file.name + "] 类型不正确！");
                        break;
                }
                ;
            }
        });
    });

    function delFile(id) {
        var flag = true;
        $.ajax({
            url: "cbsServiceController.do?delFile",
            data: {
                "id": id
            },
            cache: false,
            dataType: 'json',
            type: 'POST',
            async: false,
            success: function (data) {
                if (!data.success) {
                    flag = false;
                    //tip(data.msg);
                    top.window.tip(data.msg);
                } else {
                    top.window.tip(data.msg);
                    //隐藏标签
                    $("#" + id + "").remove();
                }
            }
        });
    }

    function Temporary() {
        submit("0");
    }

    function submit(status) {
        //调用formValidata 进行验证，并能阻止提交
        if (!form.check(false)) {
            form.submitForm(false);
            var a = $("input:focus").attr("id");
            $("html,body").animate({scrollTop: $("#" + a).offset().top + (-100) + "px"}, "fast");
            return;
        }
        var obj = {};
        var finishFiles = [];
        var m = 0;
        $("[name='finishFile']").each(function () {
            finishFiles[m] = $(this).attr("id");
            m++;
        });
        var repairFiles = [];
        var s = 0;
        $("[name='repairFile']").each(function () {
            repairFiles[s] = $(this).attr("id");
            s++;
        });
        var photoFiles = [];
        var u = 0;
        $("[name='photoFile']").each(function () {
            photoFiles[u] = $(this).attr("id");
            u++;
        });
        var equipmentType = $('#equipmentType').combotree('tree').tree('getSelected');
        obj.id = $("#id").val();
        obj.finishFiles = finishFiles;
        obj.repairFiles = repairFiles;
        obj.photoFiles = photoFiles;
        obj.photoType = $("#photoType").val();
        obj.wd = $("#wd").val();
        obj.sd = $("#sd").val();
        obj.srdy = $("#srdy").val();
        obj.lddy = $("#lddy").val();
        obj.fc = $("#fc").val();
        obj.pffs = $("#pffs").val();
        obj.sn = $("#sn").val();
        obj.ld = $("#ld").val();
        obj.ldContrast = $("#ldContrast").val();
        obj.ycDes = $("#ycDes").val();
        obj.ideaType = $("#ideaType").val();
        obj.questionDes = $("#questionDes").val();
        obj.serviceId = $("#cbsServiceId").val();
        obj.sceneTota = $("#sceneTota").val();
        obj.actualTime = $("#actualTime").val();
        obj.finishTime = $("#finishTime").val();
        obj.cinemaName = $("#cinemaName").val();
        obj.sheng = $("#sheng").val();
        obj.shi = $("#shi").val();
        obj.address = $("#address").val();
        obj.contactsName = $("#contactsName").val();
        obj.phone = $("#phone").val();
        obj.engineSn = $("#engineSn").val();
        obj.editReport = '${editReport}';
        if (equipmentType != null && equipmentType != "") {
            obj.equipmentType = equipmentType.id;
        }

        obj.type = $("#type").val();

        if (status == null) {
            obj.status = 1; //暂存是0 ，提交时1
        } else {
            obj.status = status;
        }
        $.ajax({
            url: "cbsServiceReportController.do?addEngineRefurbished",
            data: obj,
            cache: false,
            dataType: 'json',
            type: 'POST',
            async: false,
            traditional: true,
            success: function (data) {
                if (data.success) {
                    if (data.msg == 0) {
                        var type = $("#type").val();
                        if (type == 2) {
                            addOneTab("服务单管理", "cbsServiceController.do?cbsService");
                            setTimeout("closetab('引擎翻新现场检测完工单')", 1000);
                        } else {
                            addOneTab("我的任务", "cbsServiceAssignListController.do?engineerlists&code=1");
                            setTimeout("closetab('服务订单详情')", 1000);
                            setTimeout("closetab('引擎翻新现场检测完工单')", 1000);
                        }
                    } else {
                        var cbserviceId = $("#cbsServiceId").val();
                        $.ajax({
                            type: "post",
                            data: {"id": cbserviceId},
                            url: "cbsServiceReportController.do?getRole",
                            dataType: "json",
                            success: function (data) {
                                var rData = data.attributes;
                                if (rData != null) {
                                    var role = rData.role;
                                    jQuery.messager.confirm('提示:', '是否提交返件申请?', function (event) {
                                        if (event) {
                                            if (role == "EG" || role == "AEG" || role == "barcoCSE") {
                                                addOneTab("待返件任务", "cbsReturnEquipmentController.do?cbsReturnEquipmentGCS");
                                                setTimeout("closetab('引擎翻新现场检测完工单')", 1000);
                                            }
                                            if (role == "HD") {
                                                addOneTab("返件管理", "cbsReturnEquipmentController.do?cbsReturnEquipmentCSA");
                                                setTimeout("closetab('引擎翻新现场检测完工单')", 1000);
                                            }
                                            //TODO  打开该服务单的返件申请列表页

                                        } else {
                                            var type = $("#type").val();
                                            if (type == 2) {
                                                addOneTab("服务单管理", "cbsServiceController.do?cbsService");
                                                setTimeout("closetab('引擎翻新现场检测完工单')", 1000);
                                            } else {
                                                addOneTab("我的任务", "cbsServiceAssignListController.do?engineerlists&code=1");
                                                setTimeout("closetab('服务订单详情')", 1000);
                                                setTimeout("closetab('引擎翻新现场检测完工单')", 1000);
                                            }
                                        }
                                    });
                                } else {
                                    var type = $("#type").val();
                                    if (type == 2) {
                                        addOneTab("服务单管理", "cbsServiceController.do?cbsService");
                                        setTimeout("closetab('引擎翻新现场检测完工单')", 1000);
                                    } else {
                                        addOneTab("我的任务", "cbsServiceAssignListController.do?engineerlists&code=1");
                                        setTimeout("closetab('服务订单详情')", 1000);
                                        setTimeout("closetab('引擎翻新现场检测完工单')", 1000);
                                    }
                                }
                            }
                        })
                    }
                } else {
                    tip(data.msg);
                }
            }
        });
    }

    function getShi() {
        var sheng = $("#sheng").val();
        $.ajax({
            url: "cbsServiceController.do?getShi",
            data: {
                "sheng": sheng,
            },
            cache: false,
            dataType: 'json',
            type: 'POST',
            error: function () {// 请求失败处理函数
            },
            success: function (data) {
                $("#shi").html("");
                var html = "";
                for (var i = 0; i < data.length; i++) {
                    html += "<option value='" + data[i].territoryCode + "'>" + data[i].territoryName + "</option>"
                }
                $("#shi").append(html);
                var shi = $("#shi").find("option");
                var city = $("#city").val();
                for (var j = 0; j < shi.length; j++) {
                    if ($(shi[j]).val() == city) {
                        $(shi[j]).attr("selected", "selected");
                    }
                }
            }
        });
    }

    $(function () {
        form = $("#formobj").Validform({
            ignoreHidden: true,
            postonce: true,
            showAllError: true,
            ajaxPost: true,
            tiptype: 3,
        })
        getShi();
    })
</script>
<body>
<t:formvalid layout="" dialog="false" formid="formobj">
    <div style="margin-bottom:10px;">
        <div style="text-align: center; width: 100%; ">
            <c:if test="${!editReport}">
                <a href="#" class="easyui-linkbutton l-btn" onclick="Temporary()">暂存</a>
            </c:if>
            <a href="#" class="easyui-linkbutton l-btn" onclick="submit(null)">提交</a>
        </div>
    </div>
    <form>
        <div class="subtitle">
            <p>完工报告</p>
            <input type="hidden" id="cbsServiceId" value="${cbsServiceEntity.id}"/>
            <input type="hidden" id="type" value="${type}"/>

            <table class="nobordertable noborder">
                <tbody>
                <tr>
                    <td class="al_r" width="20%">
                        <label>预计上门时间:</label>
                    </td>
                    <td width="30%">
                        <fmt:formatDate value="${cbsServiceEntity.orderTime}" pattern="yyyy-MM-dd"></fmt:formatDate>
                    </td>
                    <td class="al_r" width="20%">
                        <span style="color: red">*</span><label>实际上门时间:</label>
                    </td>
                    <td width="30%">
                        <c:if test="${cbsEngineSceneCheckReportHql==null}">
                            <input onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate"
                                   name="actualTime" id="actualTime"
                                   value="<fmt:formatDate value='${dateList}' type="date" pattern="yyyy-MM-dd HH:mm:ss"/>"
                                   datatype="*" nullmsg="请填写实际上门时间"/>
                        </c:if>
                        <c:if test="${cbsEngineSceneCheckReportHql!=null}">
                            <input onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate"
                                   name="actualTime" id="actualTime"
                                   value="<fmt:formatDate value='${cbsEngineSceneCheckReportHql.actualTime}' type="date" pattern="yyyy-MM-dd HH:mm:ss"/>"
                                   datatype="*" nullmsg="请填写实际上门时间"/>
                        </c:if>
                    </td>
                </tr>
                <tr>
                    <td class="al_r" width="20%">
                        <label>上门次数:</label>
                    </td>
                    <td width="30%">
                        <input type="hidden" value="${signNumbers}" name="sceneTotal" id="sceneTotal">${signNumbers}
                    </td>
                    <td class="al_r" width="20%">
                        <span style="color: red">*</span><label>服务完工时间:</label>
                    </td>
                    <td width="30%">
                        <c:if test="${cbsEngineSceneCheckReportHql==null}">
                            <input onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate"
                                   name="finishTime" id="finishTime"
                                   value="<fmt:formatDate value='${cbsServiceEntity.closeTime}' type="date" pattern="yyyy-MM-dd HH:mm:ss"/>"
                                   datatype="*" nullmsg="请填写服务完工时间"/>
                        </c:if>
                        <c:if test="${cbsEngineSceneCheckReportHql!=null}">
                            <input onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate"
                                   name="finishTime" id="finishTime"
                                   value="<fmt:formatDate value='${cbsEngineSceneCheckReportHql.finishTime}' type="date" pattern="yyyy-MM-dd HH:mm:ss"/>"
                                   datatype="*" nullmsg="请填写服务完工时间"/>
                        </c:if>
                    </td>
                </tr>
                <tr>
                    <td class="al_r" width="20%" valign="top">
                        <span style="color: red">*</span><label>影院名称:</label>
                    </td>
                    <td width="30%" valign="top">
                        <c:if test="${cbsEngineSceneCheckReportHql==null}">
                            <input name="cinemaName" style="width: 300px" id="cinemaName"
                                   value="${cbsServiceEntity.zyCinemaName}" datatype="*" nullmsg="请填写影院名称"/>
                        </c:if>
                        <c:if test="${cbsEngineSceneCheckReportHql!=null}">
                            <input name="cinemaName" style="width: 300px" id="cinemaName"
                                   value="${cbsEngineSceneCheckReportHql.cinemaName}" datatype="*" nullmsg="请填写影院名称"/>
                        </c:if>
                    </td>
                    <td class="al_r" width="20%" valign="top">
                        <span style="color: red">*</span><label>影院地址:</label>
                    </td>
                    <td width="30%" valign="top">
                        <select style="width:100px" name="sheng" id="sheng" onchange="getCity()">
                            <c:forEach items="${territoryList}" var="terry">
                                <option
                                        <c:if test="${cbsEngineSceneCheckReportHql==null}">
                                            <c:if test="${cbsServiceEntity.province.territoryName == terry.territoryName}">selected="selected"</c:if>
                                        </c:if>
                                        <c:if test="${cbsEngineSceneCheckReportHql!=null}">
                                            <c:if test="${cbsEngineSceneCheckReportHql.sheng == terry.territoryCode}">selected="selected"</c:if>
                                        </c:if> value="${terry.territoryCode}">${terry.territoryName}</option>
                            </c:forEach>
                        </select>
                        <c:if test="${cbsEngineSceneCheckReportHql==null}">
                            <input type="hidden" id="city" value="${cbsServiceEntity.city.territoryCode}">
                        </c:if>
                        <c:if test="${cbsEngineSceneCheckReportHql!=null}">
                            <input type="hidden" id="city" value="${cbsEngineSceneCheckReportHql.shi}">
                        </c:if>
                        <select style="width:100px" id="shi" name="shi">
                                <%--<c:forEach items="${shiList}" var="terry">
                                    <option <c:if test="${cbsEngineSceneCheckReportHql==null}"><c:if test="${cbsServiceEntity.city.territoryName == terry.territoryName}">selected="selected"</c:if></c:if> <c:if test="${cbsEngineSceneCheckReportHql!=null}"><c:if test="${cbsEngineSceneCheckReportHql.shi == terry.territoryCode}">selected="selected"</c:if></c:if> value="${terry.territoryCode}">${terry.territoryName}</option>
                                </c:forEach>--%>
                        </select></br>
                        <c:if test="${cbsEngineSceneCheckReportHql==null}">
                            <input name="address" style="width: 300px" id="address" value="${cbsServiceEntity.address}"
                                   datatype="*" nullmsg="请填写影院地址"/>
                        </c:if>
                        <c:if test="${cbsEngineSceneCheckReportHql!=null}">
                            <input name="address" style="width: 300px" id="address"
                                   value="${cbsEngineSceneCheckReportHql.address}" datatype="*" nullmsg="请填写影院地址"/>
                        </c:if>
                    </td>
                </tr>
                <tr>
                    <td class="al_r" width="20%">
                        <span style="color: red">*</span><label>联系人:</label>
                    </td>
                    <td width="30%">
                        <c:if test="${cbsEngineSceneCheckReportHql==null}">
                            <input name="contactsName" id="contactsName" value="${mapList.name}" datatype="*"
                                   nullmsg="请填写联系人"/>
                        </c:if>
                        <c:if test="${cbsEngineSceneCheckReportHql!=null}">
                            <input name="contactsName" id="contactsName"
                                   value="${cbsEngineSceneCheckReportHql.contactsName}" datatype="*" nullmsg="请填写联系人"/>
                        </c:if>
                    </td>
                    <td class="al_r" width="20%">
                        <span style="color: red">*</span><label>电话:</label>
                    </td>
                    <td width="30%">
                        <c:if test="${cbsEngineSceneCheckReportHql==null}">
                            <input name="phone" id="phone" value="${mapList.contactsphone}" datatype="*"
                                   nullmsg="请填写电话"/>
                        </c:if>
                        <c:if test="${cbsEngineSceneCheckReportHql!=null}">
                            <input name="phone" id="phone" value="${cbsEngineSceneCheckReportHql.phone}" datatype="*"
                                   nullmsg="请填写电话"/>
                        </c:if>
                    </td>
                </tr>
                <tr>
                    <td class="al_r" width="20%">
                        <span style="color: red">*</span><label>放映机序列号:</label>
                    </td>
                    <td width="30%">
                        <c:if test="${cbsEngineSceneCheckReportHql==null}">
                            <input name="sn" id="sn" value="${cbsServiceEntity.sn}" datatype="*" nullmsg="请填写放映机序列号"/>
                        </c:if>
                        <c:if test="${cbsEngineSceneCheckReportHql!=null}">
                            <input name="sn" id="sn" value="${cbsEngineSceneCheckReportHql.sn}" datatype="*"
                                   nullmsg="请填写放映机序列号"/>
                        </c:if>
                    </td>
                    <td class="al_r" width="20%">
                        <label>放映机型号:</label>
                    </td>
                    <td width="30%">
                            <%--<select>
                                <option>${cbsServiceEntity.zyEquipmentSpareId.item}</option>
                            </select>--%>
                        <c:if test="${cbsEngineSceneCheckReportHql==null}">
                            <input name="equipmentType" id="equipmentType"
                                   value="${cbsServiceEntity.zyEquipmentSpareId.type.id}"/>
                        </c:if>
                        <c:if test="${cbsEngineSceneCheckReportHql!=null}">
                            <input name="equipmentType" id="equipmentType"
                                   value="${cbsEngineSceneCheckReportHql.equipmentType}"/>
                        </c:if>
                    </td>
                </tr>
                </tbody>
            </table>
            <div class="line"></div>
            <table class="nobordertable noborder">
                <tbody>
                <tr>
                    <td class="al_r" width="20%">
                        <label>完工单附件:</label>
                    </td>
                    <td width="30%">
                        <input type="hidden" name="id" id="id" value="${cbsEngineSceneCheckReportHql.id}">
                        <input type="file" id="fileUpload1"/><span id="fileName1"></span>
                        <c:if test="${zyFileLogEntityG1Hql!=null}">
                            <c:forEach items="${zyFileLogEntityG1Hql}" var="g1">
                                <p id="${g1.id}" name="finishFile" style="background-color: white"><span
                                        class="color-blue">${g1.oldFileName}</span>&nbsp;&nbsp;<a
                                        style="cursor: pointer;" onclick="delFile('${g1.id}')">[删除]</a></p>
                            </c:forEach>
                        </c:if>
                    </td>
                    <td class="al_r" width="20%">
                        <label>复新前诊断包:</label>
                    </td>
                    <td width="30%">
                        <input type="file" id="fileUpload2"/><span id="fileName2"></span>
                        <c:if test="${zyFileLogEntityG2Hql!=null}">
                            <c:forEach items="${zyFileLogEntityG2Hql}" var="g2">
                                <p id="${g2.id}" name="repairFile" style="background-color: white"><span
                                        class="color-blue">${g2.oldFileName}</span>&nbsp;&nbsp;<a
                                        style="cursor: pointer;" onclick="delFile('${g2.id}')">[删除]</a></p>
                            </c:forEach>
                        </c:if>
                    </td>
                </tr>
                <tr>
                    <td class="al_r" width="20%">
                        <label>现场照片:</label>
                    </td>
                    <td colspan="3">
                        <select style="width: auto;" name="photoType" id="photoType">
                            <option value="翻新引擎序列号" ${cbsEngineSceneCheckReportHql.photoType=='翻新引擎序列号'?"selected":""}>
                                翻新引擎序列号
                            </option>
                            <option value="翻新引擎二维码" ${cbsEngineSceneCheckReportHql.photoType=='翻新引擎二维码'?"selected":""}>
                                翻新引擎二维码
                            </option>
                            <option value="全黑测试图照片" ${cbsEngineSceneCheckReportHql.photoType=='全黑测试图照片'?"selected":""}>
                                全黑测试图照片
                            </option>
                            <option value="全白测试图照片" ${cbsEngineSceneCheckReportHql.photoType=='全白测试图照片'?"selected":""}>
                                全白测试图照片
                            </option>
                            <option value="三原色（红）测试" ${cbsEngineSceneCheckReportHql.photoType=='三原色（红）测试'?"selected":""}>
                                三原色（红）测试
                            </option>
                            <option value="三原色（绿）测试" ${cbsEngineSceneCheckReportHql.photoType=='三原色（绿）测试'?"selected":""}>
                                三原色（绿）测试
                            </option>
                            <option value="三原色（蓝）测试" ${cbsEngineSceneCheckReportHql.photoType=='三原色（蓝）测试'?"selected":""}>
                                三原色（蓝）测试
                            </option>
                            <option value="汇聚测试图照片" ${cbsEngineSceneCheckReportHql.photoType=='汇聚测试图照片'?"selected":""}>
                                汇聚测试图照片
                            </option>
                            <option value="绿聚焦测试图照片" ${cbsEngineSceneCheckReportHql.photoType=='绿聚焦测试图照片'?"selected":""}>
                                绿聚焦测试图照片
                            </option>
                            <option value="其他" ${cbsEngineSceneCheckReportHql.photoType=='其他'?"selected":""}>其他</option>
                            <option value="异常照片" ${cbsEngineSceneCheckReportHql.photoType=='异常照片'?"selected":""}>异常照片
                            </option>
                        </select>
                        <input type="file" id="fileUpload3"/>
                        <div style="width: 800px" id="fileName3"></div>
                        <c:if test="${zyFileLogEntityG3Hql!=null}">
                            <c:forEach items="${zyFileLogEntityG3Hql}" var="g3" varStatus="status">
                                <p id="${g3.id}" style="background-color: white"><span name="photoFile"
                                                                                       class="color-blue">${g3.oldFileName}</span>&nbsp;&nbsp;<a
                                        style="cursor: pointer;" onclick="delFile('${g3.id}')">[删除]</a></p><c:if
                                    test="${status.count%4==0}"><br/></c:if>
                            </c:forEach>
                        </c:if>
                    </td>
                </tr>
                <tr>
                    <td class="al_r" width="20%">
                    </td>
                    <td colspan="3">
                        <span class="color-org">提示：</span>
                        <span class="color-hui">以上测试图照片需在无遮掩状态下拍照完整画面，并且聚焦清晰。如有异常需增加细节照片，并在整体照片中圈画出异常位置。</span>
                    </td>
                </tr>
                </tbody>
            </table>
            <div class="line"></div>
            <div style="text-align: center; font-weight: bold;font-size:17px;">现场信息记录</div>
            <div><span style="font-weight: bold;">环境监测</span></div>
            <table class="nobordertable noborder">
                <tbody>
                <tr>
                    <td class="al_r" width="20%">
                        <span style="color: red">*</span><label>温度:</label>
                    </td>
                    <td width="30%">
                        <input name="wd" id="wd" value="${cbsEngineSceneCheckReportHql.wd}"
                               datatype="/^((((-(20|1\d|[1-9]))|\d|[1-4]\d)(\.\d)?)|(50(\.0)?))$/" nullmsg="请填写温度"
                               errormsg="请输入-20到50并且小数位是1位的数值！"/>
                    </td>
                    <td class="al_r" width="20%">
                        <span style="color: red">*</span><label>湿度:</label>
                    </td>
                    <td width="30%">
                        <input name="sd" id="sd" value="${cbsEngineSceneCheckReportHql.sd}" datatype="*"
                               nullmsg="请填写湿度"/>
                    </td>
                </tr>
                <tr>
                    <td class="al_r" width="20%">
                        <span style="color: red">*</span><label>输入电压:</label>
                    </td>
                    <td width="30%">
                        <input name="srdy" id="srdy" value="${cbsEngineSceneCheckReportHql.srdy}"
                               datatype="/^(((\d|[1-9]\d|[1-4]\d\d)(\.\d)?)|(500(\.0)?))$/" nullmsg="请输入输入电压"
                               errormsg="请输入0到500并且小数位是1位的数值！"/>
                    </td>
                    <td class="al_r" width="20%">
                        <span style="color: red">*</span><label>零地电压:</label>
                    </td>
                    <td width="30%">
                        <input name="lddy" id="lddy" value="${cbsEngineSceneCheckReportHql.lddy}"
                               datatype="/^(((\d|[1-2]\d)(\.\d)?)|(30(\.0)?))$/" nullmsg="请填写零地电压"
                               errormsg="请输入0到30并且小数位是1位的数值！"/>
                    </td>
                </tr>
                <tr>
                    <td class="al_r" width="20%">
                        <label>粉尘:</label>
                    </td>
                    <td width="30%">
                        <input name="fc" id="fc" value="${cbsEngineSceneCheckReportHql.fc}"/>
                    </td>
                    <td class="al_r" width="20%">
                        <label>排风风速:</label>
                    </td>
                    <td width="30%">
                        <input name="pffs" id="pffs" value="${cbsEngineSceneCheckReportHql.pffs}"/>
                    </td>
                </tr>
                </tbody>
            </table>
            <div class="line"></div>
            <div><span style="font-weight: bold;">现场检查</span></div>
            <table class="nobordertable noborder">
                <tbody>
                <tr>
                    <td class="al_r" width="20%">
                        <span style="color: red">*</span><label>引擎序列号:</label>
                    </td>
                    <td width="30%">
                        <input name="engineSn" id="engineSn" value="${cbsEngineSceneCheckReportHql.engineSn}"
                               datatype="*" nullmsg="请填写引擎序列号"/>
                    </td>
                    <td class="al_r" width="20%">

                    </td>
                    <td width="30%">

                    </td>
                </tr>
                <tr>
                    <td class="al_r" width="20%">
                        <span style="color: red">*</span><label>复新前亮度:</label>
                    </td>
                    <td width="30%">
                        <input name="ld" id="ld" value="${cbsEngineSceneCheckReportHql.ld}" datatype="*"
                               nullmsg="请填写复新前亮度"/>
                    </td>
                    <td class="al_r" width="20%">
                        <label>复新前对比度:</label>
                    </td>
                    <td width="30%">
                        <input name="ldContrast" id="ldContrast" value="${cbsEngineSceneCheckReportHql.ldContrast}"/>
                    </td>
                </tr>
                <tr>
                    <td class="al_r" width="20%" valign="top">
                        <label>异常说明:</label>
                    </td>
                    <td colspan="3">
                        <span class="color-red">以上情况如有异常或存在其他问题，请在下方做详细描述，并拍照片反馈巴可，同时立即告知影院</span>
                        <textarea style="width: 100%; height: 60px;" name="ycDes"
                                  id="ycDes">${cbsEngineSceneCheckReportHql.ycDes}</textarea>
                    </td>
                </tr>
                </tbody>
            </table>
            <div class="line"></div>
            <div><span style="font-weight: bold;">现场检测后实施意见</span></div>
            <table class="nobordertable noborder">
                <tbody>
                <tr>
                    <td class="al_r" width="20%">
                        <span style="color: red">*</span><label>工程师意见:</label>
                    </td>
                    <td colspan="3">
                        <span class="color-red">请根据现场情况选择相应的实施意见，如无法正常实施复新，请填写具体说明</span></br>
                        <select style="width: auto;" name="ideaType" id="ideaType">
                            <option value="A" ${cbsEngineSceneCheckReportHql.ideaType=='A'?"selected":""}>
                                A.所检测设备状态正常，条件符合，可以正常实施引擎复新
                            </option>
                            <option value="B" ${cbsEngineSceneCheckReportHql.ideaType=='B'?"selected":""}>
                                B.所检测设备部分情况无法现场给出明确判断，需要返厂检测后给出最终判定
                            </option>
                            <option value="C" ${cbsEngineSceneCheckReportHql.ideaType=='C'?"selected":""}>
                                C.所检测设备存在非引擎类故障。（此类存在 问题需要先修复故障，才能实施引擎翻新）
                            </option>
                            <option value="D" ${cbsEngineSceneCheckReportHql.ideaType=='D'?"selected":""}>
                                D.所检测设备引擎部分存在故障。（此类存在问题可能会导致复新价格变更，用户需确认是否继续实施引擎复新）
                            </option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="al_r" width="20%" valign="top">
                        <label>问题描述:</label>
                    </td>
                    <td colspan="3">
                            <textarea style="width: 100%; height: 60px;" name="questionDes"
                                      id="questionDes">${cbsEngineSceneCheckReportHql.questionDes}</textarea>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </form>
</t:formvalid>
</body>
</html>
